home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / UNIXLIB37B / test / c / unixtest < prev    next >
Text File  |  1992-02-10  |  575b  |  19 lines

  1. /* unixtest.c (c) Copyright 1990 H.Rogers */
  2.  
  3. /* This program displays the UNIX environment. */
  4. /* For full information on these functions, read the appropriate entries
  5.  * in sections 2 and 3 of the UNIX Programmer's Manual. */
  6.  
  7. #include <stdio.h>            /* standard I/O */
  8.  
  9. #include "unistd.h"            /* UNIX system calls */
  10.  
  11. int main()
  12. {
  13. printf("process group: %d\n\n",getpgrp());
  14. printf("pid:  %-3d ppid: %-3d\n\n",getpid(),getppid());
  15. printf("uid:  %-3d gid:  %-3d\n",getuid(),getgid());
  16. printf("euid: %-3d egid: %-3d\n\n",geteuid(),getegid());
  17. printf("login: %s\n",getlogin());
  18. }
  19.